package com.atguigu.gmall.feign.cart;

import com.atguigu.gmall.common.result.Result;
import com.atguigu.gmall.model.cart.CartItem;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient("service-cart")
@RequestMapping("/rpc/inner/cart")
public interface CartFeign {

    @GetMapping("/addCart")
    Result<CartItem> addCart(@RequestParam("skuId") Long skuId,
                             @RequestParam("skuNum") Integer skuNum);

    @DeleteMapping("/deleteChecked")
    Result deleteChecked();
    @GetMapping("/getCheckedCartItems")
    List<CartItem> getCheckedCartItems();
}
